package main

import (
	"encoding/json"
	"fmt"
)

/*

w_sg_string_0_5_gongchengbuwei :
w_sg_string_0_5_tianqi :
w_sg_date_0_5_riqi :
w_sg_list_0_21_biaogaoceliangjilu : [map[beizhu: chazhi: gaocheng: houshi: qianshi: shejigaocheng: shixiangaocheng: sort:0 yuxuwucha: zhuanghao:]]

*/
func main() {
	/* 	mapA := make(map[string]interface{})

	   	mapB := make(map[string]interface{})

	   	mapA["name"] = "小文"

	   	mapA["age"] = 25

	   	mapB["mapA"] = mapA

	   	fmt.Println(mapA) */

	/* 		for k, v := range mapB {

	   (k == 0) {

		 for _, v1 := range v{

			 fmt.Println(v1)

		  }

	   }

	} */
	//cannot range over v (type interface {})  不能对一个空接口进行range

	//所以再来看看下 上面发生了什么

	//mapA["name"] = "xiaowen" //字符串被强转成interface{}

	//mapA["ege"]  = 25        //int被强转成interface{}

	//mapB["mapA"] = mapA     //mapA被转成interface{}了 取出可以强转成  map[string]interface{}

	/* 	for k, v := range mapB {

		if k == "mapA" {

			for k, v1 := range v.(map[string]interface{}) {

				fmt.Println(k, v1)

			}

		}

	} */

	mapC := map[string]interface{}{
		"w_sg_string_0_5_gongchengbuwei": "",
		"w_sg_string_0_5_tianqi":         "",
		"w_sg_date_0_5_riqi":             "",
		"w_sg_list_0_21_biaogaoceliangjilu": `map[string]interface{}{
			"beizhu":          "",
			"chazhi":          "",
			"gaocheng":        "",
			"houshi":          "",
			"qianshi":         "",
			"shejigaocheng":   "",
			"shixiangaocheng": "",
			"sort":            0,
			"yuxuwucha":       "",
			"zhuanghao":       "",
		}"`,
	}

	var successData map[string]interface{}
	jsonSuccessData, _ := json.Marshal(mapC["w_sg_list_0_21_biaogaoceliangjilu"])
	_ = json.Unmarshal(jsonSuccessData, &successData)
	for k, v := range successData {
		fmt.Println(k, v)
	}
	/* 	for k, v := range mapC {

		if k == "w_sg_list_0_21_biaogaoceliangjilu" {

			for k, v := range v.(map[string]interface{}) {

				fmt.Println(k, v)

			}

		}

	} */
}
